<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   主题：急寻帮助:关于时间序列建模的问题  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript">
   MathJax.Hub.Config({elements: ["bbpress-forums"]});
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://cos.name/cn/topic/102153/",
                  host: "http://cos.name",
                  prePath: "http://cos.name",
                  scheme: "http",
                  pathBase: "http://cos.name/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466445710: Accept with keywords: (title(0.2):问题,主题,时间序列,建模,论坛, topn(0.233333333333):RSS订阅,斑竹,拟合,帖子,作者,会员,用户名,主站,新鲜事,例子,时间序列,数据,预测,效果,原图,建模,问题,密码,总计,兴趣小组,资料,版主,代码,主题,普通,同法,频率,论坛,序列,讨论区).-->
 </head>
 <body class="topic bbpress single single-topic postid-102153 single-author sidebar" onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    主题：急寻帮助:关于时间序列建模的问题
   </h1>
  </div>
  <div class="container" id="xmain">
   <div class="hfeed site" id="page">
    <header class="site-header" id="masthead" role="banner">
     <div id="cos-logo">
      <a href="http://cos.name/cn">
       <img src="http://cos.name/cn/wp-content/themes/COS-forest/images/headers/cos-logo.png"/>
      </a>
     </div>
     <div class="navbar" id="navbar">
      <nav class="navigation main-navigation" id="site-navigation" role="navigation">
       <h3 class="menu-toggle">
        菜单
       </h3>
       <div class="menu-%e8%8f%9c%e5%8d%951-container">
        <ul class="nav-menu" id="menu-%e8%8f%9c%e5%8d%951">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-home menu-item-407772" id="menu-item-407772">
          <a href="http://cos.name/cn/">
           论坛首页
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407773" id="menu-item-407773">
          <a href="http://cos.name/cn/forums/">
           讨论区
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407774" id="menu-item-407774">
          <a href="http://cos.name/cn/wp-login.php?action=register">
           注册
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-407819" id="menu-item-407819">
          <a href="http://cos.name/">
           主站
          </a>
         </li>
        </ul>
       </div>
      </nav>
      <!-- #site-navigation -->
     </div>
     <!-- #navbar -->
    </header>
    <!-- #masthead -->
    <div class="site-main" id="main">
     <div class="content-area" id="primary">
      <div class="site-content" id="content" role="main">
       <article class="post-102153 topic type-topic status-publish hentry" id="post-102153">
        <header class="entry-header">
         <h1 class="entry-title">
          急寻帮助:关于时间序列建模的问题
         </h1>
        </header>
        <!-- .entry-header -->
        <div class="entry-content">
         <div id="bbpress-forums">
          <div class="bbp-breadcrumb">
           <p>
            <a class="bbp-breadcrumb-home" href="http://cos.name/cn/">
             COS论坛 | 统计之都
            </a>
            <span class="bbp-breadcrumb-sep">
             ›
            </span>
            <a class="bbp-breadcrumb-root" href="http://cos.name/cn/forums/">
             讨论区
            </a>
            <span class="bbp-breadcrumb-sep">
             ›
            </span>
            <a class="bbp-breadcrumb-forum" href="http://cos.name/cn/forum/stat-world/">
             统计学世界
            </a>
            <span class="bbp-breadcrumb-sep">
             ›
            </span>
            <a class="bbp-breadcrumb-forum" href="http://cos.name/cn/forum/stat-world/special/">
             特别兴趣小组
            </a>
            <span class="bbp-breadcrumb-sep">
             ›
            </span>
            <a class="bbp-breadcrumb-forum" href="http://cos.name/cn/forum/stat-world/special/finance/">
             金融投资分析
            </a>
            <span class="bbp-breadcrumb-sep">
             ›
            </span>
            <span class="bbp-breadcrumb-current">
             急寻帮助:关于时间序列建模的问题
            </span>
           </p>
          </div>
          <div class="bbp-template-notice info">
           <p class="bbp-topic-description">
            该主题包含 11 条回复，3个帖子，最后由
            <a class="bbp-author-avatar" href="http://cos.name/cn/profile/86952/" rel="nofollow" title="查看dengyishuo的档案">
             <img src="http://sdn.geekzu.org/avatar/7969a4509f4093e8637e6bf70f3f7fc1?s=14&amp;d=monsterid&amp;r=g"/>
            </a>
            <a class="bbp-author-name" href="http://cos.name/cn/profile/86952/" rel="nofollow" title="查看dengyishuo的档案">
             dengyishuo
            </a>
            在
            <a href="http://cos.name/cn/topic/102153/#post-306484" title="回复：急寻帮助:关于时间序列建模的问题">
             5 年, 11 月 之前
            </a>
            更新。
           </p>
          </div>
          <div class="bbp-pagination">
           <div class="bbp-pagination-count">
            查看 12 个帖子 - 1 到 12（总计 12 个）
           </div>
           <div class="bbp-pagination-links">
           </div>
          </div>
          <ul class="forums bbp-replies" id="topic-102153-replies">
           <li class="bbp-header">
            <div class="bbp-reply-author">
             作者
            </div>
            <!-- .bbp-reply-author -->
            <div class="bbp-reply-content">
             帖子
            </div>
            <!-- .bbp-reply-content -->
           </li>
           <!-- .bbp-header -->
           <li class="bbp-body">
            <div class="bbp-reply-header" id="post-102153">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2010年7月22日 上午9:45
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/102153/#post-102153">
               1 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-102153 -->
            <div class="odd bbp-parent-forum-1015 bbp-parent-topic-102153 bbp-reply-position-1 user-id-107665 topic-author post-102153 topic type-topic status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107665/" rel="nofollow" title="查看freeplan的档案">
               <img src="http://sdn.geekzu.org/avatar/41dafaf7e86bec061c1771262e0c8563?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/107665/" rel="nofollow" title="查看freeplan的档案">
               freeplan
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               有以天为单位的数据,该数据呈现出周期特征(月初低月末高),
               <br/>
               1 请问如何给定时间序列的频率,因为每个月的天数不一致(我看到书上的资料都是以月,季度,年为例子的,频率是固定的,没有这种数据)?
               <br/>
               2 对这种数据如何进行时间序列的建模和预测,通过R如何做?或应该读那些文献和资料?
              </p>
              <p>
               数据如下:
               <br/>
               47.37	01-Sep-09
               <br/>
               48.64	02-Sep-09
               <br/>
               47.61	03-Sep-09
               <br/>
               48.18	04-Sep-09
               <br/>
               46.71	05-Sep-09
               <br/>
               47.09	06-Sep-09
               <br/>
               46.94	07-Sep-09
               <br/>
               45.94	08-Sep-09
               <br/>
               45.40	09-Sep-09
               <br/>
               44.15	10-Sep-09
               <br/>
               43.73	11-Sep-09
               <br/>
               43.87	12-Sep-09
               <br/>
               44.09	13-Sep-09
               <br/>
               44.01	14-Sep-09
               <br/>
               44.00	15-Sep-09
               <br/>
               44.10	16-Sep-09
               <br/>
               44.12	17-Sep-09
               <br/>
               43.98	18-Sep-09
               <br/>
               44.16	19-Sep-09
               <br/>
               44.44	20-Sep-09
               <br/>
               44.63	21-Sep-09
               <br/>
               44.67	22-Sep-09
               <br/>
               44.59	23-Sep-09
               <br/>
               44.36	24-Sep-09
               <br/>
               44.67	25-Sep-09
               <br/>
               44.84	26-Sep-09
               <br/>
               44.87	27-Sep-09
               <br/>
               44.83	28-Sep-09
               <br/>
               44.80	29-Sep-09
               <br/>
               45.75	30-Sep-09
               <br/>
               37.64	01-Oct-09
               <br/>
               39.87	02-Oct-09
               <br/>
               41.54	03-Oct-09
               <br/>
               42.89	04-Oct-09
               <br/>
               44.14	05-Oct-09
               <br/>
               44.73	06-Oct-09
               <br/>
               45.30	07-Oct-09
               <br/>
               45.73	08-Oct-09
               <br/>
               46.12	09-Oct-09
               <br/>
               46.28	10-Oct-09
               <br/>
               46.67	11-Oct-09
               <br/>
               46.87	12-Oct-09
               <br/>
               47.01	13-Oct-09
               <br/>
               47.04	14-Oct-09
               <br/>
               47.18	15-Oct-09
               <br/>
               47.37	16-Oct-09
               <br/>
               47.68	17-Oct-09
               <br/>
               47.90	18-Oct-09
               <br/>
               48.03	19-Oct-09
               <br/>
               48.07	20-Oct-09
               <br/>
               48.05	21-Oct-09
               <br/>
               40.78	22-Oct-09
               <br/>
               48.03	23-Oct-09
               <br/>
               48.10	24-Oct-09
               <br/>
               48.25	25-Oct-09
               <br/>
               48.27	26-Oct-09
               <br/>
               48.28	27-Oct-09
               <br/>
               48.27	28-Oct-09
               <br/>
               47.98	29-Oct-09
               <br/>
               48.31	30-Oct-09
               <br/>
               48.49	31-Oct-09
               <br/>
               46.28	01-Nov-09
               <br/>
               48.48	02-Nov-09
               <br/>
               48.78	03-Nov-09
               <br/>
               49.21	04-Nov-09
               <br/>
               49.20	05-Nov-09
               <br/>
               49.13	06-Nov-09
               <br/>
               49.16	07-Nov-09
               <br/>
               49.72	08-Nov-09
               <br/>
               49.82	09-Nov-09
               <br/>
               49.92	10-Nov-09
               <br/>
               49.65	11-Nov-09
               <br/>
               49.50	12-Nov-09
               <br/>
               49.32	13-Nov-09
               <br/>
               49.55	14-Nov-09
               <br/>
               49.72	15-Nov-09
               <br/>
               49.71	16-Nov-09
               <br/>
               49.74	17-Nov-09
               <br/>
               49.68	18-Nov-09
               <br/>
               49.88	19-Nov-09
               <br/>
               49.80	20-Nov-09
               <br/>
               49.87	21-Nov-09
               <br/>
               50.04	22-Nov-09
               <br/>
               50.12	23-Nov-09
               <br/>
               49.95	24-Nov-09
               <br/>
               49.79	25-Nov-09
               <br/>
               49.66	26-Nov-09
               <br/>
               49.41	27-Nov-09
               <br/>
               49.48	28-Nov-09
               <br/>
               49.59	29-Nov-09
               <br/>
               49.75	30-Nov-09
               <br/>
               44.75	01-Dec-09
               <br/>
               47.01	02-Dec-09
               <br/>
               48.37	03-Dec-09
               <br/>
               50.13	04-Dec-09
               <br/>
               51.81	05-Dec-09
               <br/>
               53.06	06-Dec-09
               <br/>
               25.56	07-Dec-09
               <br/>
               53.92	08-Dec-09
               <br/>
               53.68	09-Dec-09
               <br/>
               53.29	10-Dec-09
               <br/>
               52.92	11-Dec-09
               <br/>
               53.23	12-Dec-09
               <br/>
               53.61	13-Dec-09
               <br/>
               53.69	14-Dec-09
               <br/>
               53.85	15-Dec-09
               <br/>
               53.85	16-Dec-09
               <br/>
               53.85	17-Dec-09
               <br/>
               53.73	18-Dec-09
               <br/>
               53.85	19-Dec-09
               <br/>
               54.00	20-Dec-09
               <br/>
               53.99	21-Dec-09
               <br/>
               53.97	22-Dec-09
               <br/>
               53.94	23-Dec-09
               <br/>
               53.97	24-Dec-09
               <br/>
               53.88	25-Dec-09
               <br/>
               54.03	26-Dec-09
               <br/>
               54.27	27-Dec-09
               <br/>
               54.12	28-Dec-09
               <br/>
               54.26	29-Dec-09
               <br/>
               54.22	30-Dec-09
               <br/>
               54.35	31-Dec-09
               <br/>
               43.95	01-Jan-10
               <br/>
               48.32	02-Jan-10
               <br/>
               49.94	03-Jan-10
               <br/>
               51.14	04-Jan-10
               <br/>
               50.76	05-Jan-10
               <br/>
               50.83	06-Jan-10
               <br/>
               50.74	07-Jan-10
               <br/>
               50.41	08-Jan-10
               <br/>
               50.62	09-Jan-10
               <br/>
               41.76	10-Jan-10
               <br/>
               50.41	11-Jan-10
               <br/>
               50.23	12-Jan-10
               <br/>
               50.16	13-Jan-10
               <br/>
               49.95	14-Jan-10
               <br/>
               49.86	15-Jan-10
               <br/>
               49.93	16-Jan-10
               <br/>
               49.98	17-Jan-10
               <br/>
               49.88	18-Jan-10
               <br/>
               49.83	19-Jan-10
               <br/>
               49.77	20-Jan-10
               <br/>
               49.73	21-Jan-10
               <br/>
               49.61	22-Jan-10
               <br/>
               49.58	23-Jan-10
               <br/>
               49.69	24-Jan-10
               <br/>
               49.61	25-Jan-10
               <br/>
               49.34	26-Jan-10
               <br/>
               49.22	27-Jan-10
               <br/>
               49.15	28-Jan-10
               <br/>
               49.13	29-Jan-10
               <br/>
               49.21	30-Jan-10
               <br/>
               49.43	31-Jan-10
               <br/>
               44.54	01-Feb-10
               <br/>
               45.74	02-Feb-10
               <br/>
               46.52	03-Feb-10
               <br/>
               46.56	04-Feb-10
               <br/>
               46.40	05-Feb-10
               <br/>
               46.51	06-Feb-10
               <br/>
               47.06	07-Feb-10
               <br/>
               47.16	08-Feb-10
               <br/>
               47.16	09-Feb-10
               <br/>
               46.91	10-Feb-10
               <br/>
               47.14	11-Feb-10
               <br/>
               47.70	12-Feb-10
               <br/>
               48.37	13-Feb-10
               <br/>
               48.62	14-Feb-10
               <br/>
               48.92	15-Feb-10
               <br/>
               49.34	16-Feb-10
               <br/>
               49.74	17-Feb-10
               <br/>
               50.10	18-Feb-10
               <br/>
               50.31	19-Feb-10
               <br/>
               50.67	20-Feb-10
               <br/>
               50.82	21-Feb-10
               <br/>
               50.85	22-Feb-10
               <br/>
               50.89	23-Feb-10
               <br/>
               50.89	24-Feb-10
               <br/>
               50.91	25-Feb-10
               <br/>
               50.63	26-Feb-10
               <br/>
               50.68	27-Feb-10
               <br/>
               50.75	28-Feb-10
               <br/>
               43.95	01-Mar-10
               <br/>
               45.66	02-Mar-10
               <br/>
               46.61	03-Mar-10
               <br/>
               47.26	04-Mar-10
               <br/>
               47.54	05-Mar-10
               <br/>
               47.87	06-Mar-10
               <br/>
               48.30	07-Mar-10
               <br/>
               48.51	08-Mar-10
               <br/>
               48.51	09-Mar-10
               <br/>
               48.69	10-Mar-10
               <br/>
               48.74	11-Mar-10
               <br/>
               48.71	12-Mar-10
               <br/>
               48.86	13-Mar-10
               <br/>
               49.05	14-Mar-10
               <br/>
               48.99	15-Mar-10
               <br/>
               49.01	16-Mar-10
               <br/>
               49.09	17-Mar-10
               <br/>
               49.16	18-Mar-10
               <br/>
               49.18	19-Mar-10
               <br/>
               49.25	20-Mar-10
               <br/>
               49.25	21-Mar-10
               <br/>
               49.21	22-Mar-10
               <br/>
               49.06	23-Mar-10
               <br/>
               48.88	24-Mar-10
               <br/>
               48.80	25-Mar-10
               <br/>
               48.76	26-Mar-10
               <br/>
               48.89	27-Mar-10
               <br/>
               48.96	28-Mar-10
               <br/>
               48.95	29-Mar-10
               <br/>
               48.91	30-Mar-10
               <br/>
               49.09	31-Mar-10
               <br/>
               46.33	01-Apr-10
               <br/>
               46.18	02-Apr-10
               <br/>
               47.52	03-Apr-10
               <br/>
               48.50	04-Apr-10
               <br/>
               48.96	05-Apr-10
               <br/>
               49.22	06-Apr-10
               <br/>
               49.46	07-Apr-10
               <br/>
               49.59	08-Apr-10
               <br/>
               49.73	09-Apr-10
               <br/>
               49.88	10-Apr-10
               <br/>
               50.21	11-Apr-10
               <br/>
               50.27	12-Apr-10
               <br/>
               50.08	13-Apr-10
               <br/>
               50.17	14-Apr-10
               <br/>
               50.22	15-Apr-10
               <br/>
               50.25	16-Apr-10
               <br/>
               50.41	17-Apr-10
               <br/>
               50.38	18-Apr-10
               <br/>
               50.49	19-Apr-10
               <br/>
               50.43	20-Apr-10
               <br/>
               50.47	21-Apr-10
               <br/>
               50.47	22-Apr-10
               <br/>
               50.51	23-Apr-10
               <br/>
               50.56	24-Apr-10
               <br/>
               50.66	25-Apr-10
               <br/>
               50.71	26-Apr-10
               <br/>
               50.74	27-Apr-10
               <br/>
               50.69	28-Apr-10
               <br/>
               50.59	29-Apr-10
               <br/>
               50.78	30-Apr-10
               <br/>
               40.48	01-May-10
               <br/>
               44.05	02-May-10
               <br/>
               46.70	03-May-10
               <br/>
               47.75	04-May-10
               <br/>
               48.25	05-May-10
               <br/>
               48.18	06-May-10
               <br/>
               48.00	07-May-10
               <br/>
               48.39	08-May-10
               <br/>
               49.07	09-May-10
               <br/>
               49.63	10-May-10
               <br/>
               49.83	11-May-10
               <br/>
               50.04	12-May-10
               <br/>
               50.19	13-May-10
               <br/>
               50.39	14-May-10
               <br/>
               50.60	15-May-10
               <br/>
               50.54	16-May-10
               <br/>
               50.23	17-May-10
               <br/>
               50.03	18-May-10
               <br/>
               50.01	19-May-10
               <br/>
               50.00	20-May-10
               <br/>
               50.07	21-May-10
               <br/>
               50.19	22-May-10
               <br/>
               50.33	23-May-10
               <br/>
               50.40	24-May-10
               <br/>
               50.42	25-May-10
               <br/>
               50.45	26-May-10
               <br/>
               50.51	27-May-10
               <br/>
               50.47	28-May-10
               <br/>
               50.59	29-May-10
               <br/>
               50.71	30-May-10
               <br/>
               50.91	31-May-10
               <br/>
               42.53	01-Jun-10
               <br/>
               45.91	02-Jun-10
               <br/>
               47.27	03-Jun-10
               <br/>
               47.94	04-Jun-10
               <br/>
               48.65	05-Jun-10
               <br/>
               49.64	06-Jun-10
               <br/>
               50.24	07-Jun-10
               <br/>
               50.55	08-Jun-10
               <br/>
               50.78	09-Jun-10
               <br/>
               50.99	10-Jun-10
               <br/>
               51.17	11-Jun-10
               <br/>
               51.11	12-Jun-10
               <br/>
               51.07	13-Jun-10
               <br/>
               51.13	14-Jun-10
               <br/>
               51.26	15-Jun-10
               <br/>
               51.38	16-Jun-10
               <br/>
               51.56	17-Jun-10
               <br/>
               51.53	18-Jun-10
               <br/>
               51.73	19-Jun-10
               <br/>
               51.91	20-Jun-10
               <br/>
               51.89	21-Jun-10
               <br/>
               51.83	22-Jun-10
               <br/>
               51.70	23-Jun-10
               <br/>
               51.63	24-Jun-10
               <br/>
               51.52	25-Jun-10
               <br/>
               51.57	26-Jun-10
               <br/>
               51.71	27-Jun-10
               <br/>
               51.67	28-Jun-10
               <br/>
               51.55	29-Jun-10
               <br/>
               51.63	30-Jun-10
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-306440">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2010年7月22日 下午6:25
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/102153/#post-306440">
               2 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-306440 -->
            <div class="even bbp-parent-forum-1015 bbp-parent-topic-102153 bbp-reply-position-2 user-id-108065 post-306440 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/108065/" rel="nofollow" title="查看sunsetcliff的档案">
               <img src="http://sdn.geekzu.org/avatar/780b8442cc716edc091a11960f9a407c?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/108065/" rel="nofollow" title="查看sunsetcliff的档案">
               sunsetcliff
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               建议：1）如果只需要fit这个序列，在R Help 网页里面搜索 “R Periodical Time Series” 或者 “R seansonal (seasonality)”你就能找到相关的包，参照例子，把你的数据放进去，然后读结果
               <br/>
               2）你如果需要找出序列的一个“周期”，最好的方法是把频谱图（periodgram) 画出来，其实就是一个离散FFT, 同法可以在R help里面搜索到－ 如果你不想自己写一段代码的话。
               <br/>
               3）关于预测，读相关的R function的说明，一个命令而已。
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-306445">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2010年7月23日 上午3:45
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/102153/#post-306445">
               3 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-306445 -->
            <div class="odd bbp-parent-forum-1015 bbp-parent-topic-102153 bbp-reply-position-3 user-id-107665 topic-author post-306445 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107665/" rel="nofollow" title="查看freeplan的档案">
               <img src="http://sdn.geekzu.org/avatar/41dafaf7e86bec061c1771262e0c8563?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/107665/" rel="nofollow" title="查看freeplan的档案">
               freeplan
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               关键是我用了R里边的arima和ets建模,用来预测的效果很差,不知道为什么?是不是这种周期不定的时间序列很难预测
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-306468">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2010年7月23日 下午4:59
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/102153/#post-306468">
               4 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-306468 -->
            <div class="even bbp-parent-forum-1015 bbp-parent-topic-102153 bbp-reply-position-4 user-id-108065 post-306468 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/108065/" rel="nofollow" title="查看sunsetcliff的档案">
               <img src="http://sdn.geekzu.org/avatar/780b8442cc716edc091a11960f9a407c?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/108065/" rel="nofollow" title="查看sunsetcliff的档案">
               sunsetcliff
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               如果差得“非常非常”远的话，我估计是你fit的是deseasonalize 之后的序列，如果这样的话，预测的时候，seasonal component是要加上去的。要再仔细读读函数的文档说明。
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-306469">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2010年7月24日 上午1:38
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/102153/#post-306469">
               5 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-306469 -->
            <div class="odd bbp-parent-forum-1015 bbp-parent-topic-102153 bbp-reply-position-5 user-id-107665 topic-author post-306469 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107665/" rel="nofollow" title="查看freeplan的档案">
               <img src="http://sdn.geekzu.org/avatar/41dafaf7e86bec061c1771262e0c8563?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/107665/" rel="nofollow" title="查看freeplan的档案">
               freeplan
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               library(“forecast”)
               <br/>
               fit&lt;-auto.arima(x)
               <br/>
               forecast(fit,h=30))
              </p>
              <p>
               x为时间序列(frequency=30),请问这样有问题吗?
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-306470">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2010年7月24日 上午2:25
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/102153/#post-306470">
               6 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-306470 -->
            <div class="even bbp-parent-forum-1015 bbp-parent-topic-102153 bbp-reply-position-6 user-id-86952 post-306470 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/86952/" rel="nofollow" title="查看dengyishuo的档案">
               <img src="http://sdn.geekzu.org/avatar/7969a4509f4093e8637e6bf70f3f7fc1?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/86952/" rel="nofollow" title="查看dengyishuo的档案">
               dengyishuo
              </a>
              <br/>
              <div class="bbp-author-role">
               版主
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               回复 第3楼 的 freeplan：你说的误差大是多大？
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-306473">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2010年7月24日 上午3:23
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/102153/#post-306473">
               7 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-306473 -->
            <div class="odd bbp-parent-forum-1015 bbp-parent-topic-102153 bbp-reply-position-7 user-id-107665 topic-author post-306473 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107665/" rel="nofollow" title="查看freeplan的档案">
               <img src="http://sdn.geekzu.org/avatar/41dafaf7e86bec061c1771262e0c8563?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/107665/" rel="nofollow" title="查看freeplan的档案">
               freeplan
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               将上述数据去掉最后一个月(用来做检验),建模的过程如下,发现预测的值固定不变(都相等),搞不清楚.
               <br/>
               对时间序列不太懂.
               <br/>
               &gt; x&lt;-read.table(“d:/1.txt”)
               <br/>
               &gt; y&lt;-ts(x[,1],frequency=30)
               <br/>
               &gt; library(“forecast”)
               <br/>
               &gt; fit&lt;-auto.arima(y)
               <br/>
               &gt; forecast(fit,h=30)
               <br/>
               Point Forecast    Lo 80    Hi 80    Lo 95    Hi 95
               <br/>
               10.10000       50.62532 47.58716 53.66348 45.97886 55.27179
               <br/>
               10.13333       50.62532 47.47925 53.77140 45.81382 55.43683
               <br/>
               10.16667       50.62532 47.37492 53.87573 45.65425 55.59639
               <br/>
               10.20000       50.62532 47.27383 53.97681 45.49966 55.75099
               <br/>
               10.23333       50.62532 47.17571 54.07494 45.34959 55.90106
               <br/>
               10.26667       50.62532 47.08030 54.17035 45.20367 56.04697
               <br/>
               10.30000       50.62532 46.98739 54.26326 45.06158 56.18907
               <br/>
               10.33333       50.62532 46.89679 54.35385 44.92303 56.32762
               <br/>
               10.36667       50.62532 46.80835 54.44230 44.78776 56.46288
               <br/>
               10.40000       50.62532 46.72191 54.52874 44.65556 56.59508
               <br/>
               10.43333       50.62532 46.63734 54.61331 44.52623 56.72442
               <br/>
               10.46667       50.62532 46.55453 54.69612 44.39958 56.85107
               <br/>
               10.50000       50.62532 46.47337 54.77728 44.27545 56.97519
               <br/>
               10.53333       50.62532 46.39376 54.85688 44.15371 57.09693
               <br/>
               10.56667       50.62532 46.31563 54.93502 44.03422 57.21643
               <br/>
               10.60000       50.62532 46.23889 55.01176 43.91685 57.33380
               <br/>
               10.63333       50.62532 46.16346 55.08718 43.80150 57.44914
               <br/>
               10.66667       50.62532 46.08930 55.16135 43.68807 57.56258
               <br/>
               10.70000       50.62532 46.01632 55.23432 43.57646 57.67418
               <br/>
               10.73333       50.62532 45.94448 55.30616 43.46660 57.78405
               <br/>
               10.76667       50.62532 45.87373 55.37691 43.35839 57.89225
               <br/>
               10.80000       50.62532 45.80402 55.44663 43.25177 57.99887
               <br/>
               10.83333       50.62532 45.73530 55.51535 43.14668 58.10397
               <br/>
               10.86667       50.62532 45.66753 55.58311 43.04304 58.20761
               <br/>
               10.90000       50.62532 45.60068 55.64997 42.94079 58.30985
               <br/>
               10.93333       50.62532 45.53470 55.71594 42.83989 58.41075
               <br/>
               10.96667       50.62532 45.46957 55.78107 42.74028 58.51036
               <br/>
               11.00000       50.62532 45.40525 55.84539 42.64192 58.60873
               <br/>
               11.03333       50.62532 45.34172 55.90893 42.54475 58.70590
               <br/>
               11.06667       50.62532 45.27894 55.97171 42.44873 58.80191
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-306475">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2010年7月24日 上午6:24
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/102153/#post-306475">
               8 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-306475 -->
            <div class="even bbp-parent-forum-1015 bbp-parent-topic-102153 bbp-reply-position-8 user-id-86952 post-306475 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/86952/" rel="nofollow" title="查看dengyishuo的档案">
               <img src="http://sdn.geekzu.org/avatar/7969a4509f4093e8637e6bf70f3f7fc1?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/86952/" rel="nofollow" title="查看dengyishuo的档案">
               dengyishuo
              </a>
              <br/>
              <div class="bbp-author-role">
               版主
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               用arima()建模就可以。建模效果：
              </p>
              <p>
               [attachment=206475,398]
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-306477">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2010年7月24日 上午8:57
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/102153/#post-306477">
               9 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-306477 -->
            <div class="odd bbp-parent-forum-1015 bbp-parent-topic-102153 bbp-reply-position-9 user-id-107665 topic-author post-306477 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/107665/" rel="nofollow" title="查看freeplan的档案">
               <img src="http://sdn.geekzu.org/avatar/41dafaf7e86bec061c1771262e0c8563?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/107665/" rel="nofollow" title="查看freeplan的档案">
               freeplan
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               能给一下R的脚本吗,arima的各个参数是怎样的?谢谢
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-306479">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2010年7月24日 下午2:32
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/102153/#post-306479">
               10 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-306479 -->
            <div class="even bbp-parent-forum-1015 bbp-parent-topic-102153 bbp-reply-position-10 user-id-86952 post-306479 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/86952/" rel="nofollow" title="查看dengyishuo的档案">
               <img src="http://sdn.geekzu.org/avatar/7969a4509f4093e8637e6bf70f3f7fc1?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/86952/" rel="nofollow" title="查看dengyishuo的档案">
               dengyishuo
              </a>
              <br/>
              <div class="bbp-author-role">
               版主
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               下面代码可以复制原图。
              </p>
              <pre class="highlight ">data=read.table("://mydata")
V1=data[,1]
fit=arima(V1,order=c(3,0,0))
pre=predict(fit,n.ahead=10)$pre
plot(c(V1,pre),type="n")
points(V1,pch=20,col="red")
lines(V1,col="red")
points(V1-residuals(fit),pch=20,col="blue")
lines(pre,col="green",lwd=2)
legend(0,55,legend=c("真实值","拟合值","预测值"),col=c("red","blue","green"),pch=rep(20,3))
</pre>
              <p>
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-306482">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2010年7月24日 下午5:44
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/102153/#post-306482">
               11 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-306482 -->
            <div class="odd bbp-parent-forum-1015 bbp-parent-topic-102153 bbp-reply-position-11 user-id-108065 post-306482 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/108065/" rel="nofollow" title="查看sunsetcliff的档案">
               <img src="http://sdn.geekzu.org/avatar/780b8442cc716edc091a11960f9a407c?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/108065/" rel="nofollow" title="查看sunsetcliff的档案">
               sunsetcliff
              </a>
              <br/>
              <div class="bbp-author-role">
               普通会员
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               斑竹用的是AR(3)? 不错看了数据图，感觉用smooth效果应该会比用arima好。
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
            <div class="bbp-reply-header" id="post-306484">
             <div class="bbp-meta">
              <span class="bbp-reply-post-date">
               2010年7月24日 下午11:27
              </span>
              <a class="bbp-reply-permalink" href="http://cos.name/cn/topic/102153/#post-306484">
               12 楼
              </a>
              <span class="bbp-admin-links">
              </span>
             </div>
             <!-- .bbp-meta -->
            </div>
            <!-- #post-306484 -->
            <div class="even bbp-parent-forum-1015 bbp-parent-topic-102153 bbp-reply-position-12 user-id-86952 post-306484 reply type-reply status-publish hentry">
             <div class="bbp-reply-author">
              <a class="bbp-author-avatar" href="http://cos.name/cn/profile/86952/" rel="nofollow" title="查看dengyishuo的档案">
               <img src="http://sdn.geekzu.org/avatar/7969a4509f4093e8637e6bf70f3f7fc1?s=80&amp;d=monsterid&amp;r=g"/>
              </a>
              <br/>
              <a class="bbp-author-name" href="http://cos.name/cn/profile/86952/" rel="nofollow" title="查看dengyishuo的档案">
               dengyishuo
              </a>
              <br/>
              <div class="bbp-author-role">
               版主
              </div>
             </div>
             <!-- .bbp-reply-author -->
             <div class="bbp-reply-content">
              <p>
               回复 第11楼 的 sunsetcliff：我没有用smooth()，不知道smooth的效果。就算smooth的效果更好也是正常的。
              </p>
             </div>
             <!-- .bbp-reply-content -->
            </div>
            <!-- .reply -->
           </li>
           <!-- .bbp-body -->
           <li class="bbp-footer">
            <div class="bbp-reply-author">
             作者
            </div>
            <div class="bbp-reply-content">
             帖子
            </div>
            <!-- .bbp-reply-content -->
           </li>
           <!-- .bbp-footer -->
          </ul>
          <!-- #topic-102153-replies -->
          <div class="bbp-pagination">
           <div class="bbp-pagination-count">
            查看 12 个帖子 - 1 到 12（总计 12 个）
           </div>
           <div class="bbp-pagination-links">
           </div>
          </div>
          <div class="bbp-no-reply" id="no-reply-102153">
           <div class="bbp-template-notice">
            <p>
             您必须先登录才能回复该主题。
            </p>
           </div>
          </div>
         </div>
        </div>
        <!-- .entry-content -->
        <footer class="entry-meta">
        </footer>
        <!-- .entry-meta -->
       </article>
       <!-- #post -->
       <div class="comments-area" id="comments">
       </div>
       <!-- #comments -->
      </div>
      <!-- #content -->
     </div>
     <!-- #primary -->
     <div class="sidebar-container" id="tertiary" role="complementary">
      <div class="sidebar-inner">
       <div class="widget-area">
        <aside class="widget bbp_widget_login" id="bbp_login_widget-2">
         <h3 class="widget-title">
          登录
         </h3>
         <form action="http://cos.name/cn/wp-login.php" class="bbp-login-form" method="post">
          <fieldset>
           <legend>
            登录
           </legend>
           <div class="bbp-username">
            <label for="user_login">
             用户名:
            </label>
           </div>
           <div class="bbp-password">
            <label for="user_pass">
             密码:
            </label>
           </div>
           <div class="bbp-remember-me">
            <label for="rememberme">
             记住用户名
            </label>
           </div>
           <div class="bbp-submit-wrapper">
            <button class="button submit user-submit" id="user-submit" name="user-submit" tabindex="104" type="submit">
             登录
            </button>
           </div>
           <div class="bbp-login-links">
            <a class="bbp-register-link" href="http://cos.name/cn/wp-login.php?action=register" title="注册">
             注册
            </a>
            <a class="bbp-lostpass-link" href="http://cos.name/cn/wp-login.php?action=lostpassword" title="忘记密码">
             忘记密码
            </a>
           </div>
          </fieldset>
         </form>
        </aside>
        <aside class="widget widget_text" id="text-7">
         <h3 class="widget-title">
          搜索
         </h3>
         <div class="textwidget">
          <form action="http://www.google.com/search" id="bbp-search-form" method="get" onsubmit="Gsitesearch(this)" role="search">
           <div>
           </div>
          </form>
          <form id="bbp-search-form-baidu" onsubmit="g(this)" role="search">
           <div>
           </div>
          </form>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-2">
         <h3 class="widget-title">
          新鲜事
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            <a href="http://cos.name/cn/topics/">
             最新帖子
            </a>
           </li>
           <li>
            <a href="http://cos.name/cn/view/popular/">
             最热门主题
            </a>
           </li>
           <li>
            <a href="http://cos.name/cn/view/no-replies/">
             消灭零回复
            </a>
           </li>
          </ul>
         </div>
        </aside>
        <aside class="widget widget_text" id="text-3">
         <h3 class="widget-title">
          RSS订阅
         </h3>
         <div class="textwidget">
          <ul>
           <li>
            <img src="http://cos.name/wp-includes/images/rss.png"/>
            <a href="http://cos.name/cn/topics/feed/">
             所有主题
            </a>
           </li>
           <li>
            <img src="http://cos.name/wp-includes/images/rss.png"/>
            <a href="http://cos.name/cn/forums/feed/">
             所有帖子
            </a>
           </li>
          </ul>
         </div>
        </aside>
       </div>
       <!-- .widget-area -->
      </div>
      <!-- .sidebar-inner -->
     </div>
     <!-- #tertiary -->
    </div>
    <!-- #main -->
    <footer class="site-footer" id="colophon" role="contentinfo">
     <div class="site-info">
      版权所有 © 2014 统计之都 | 由
      <a href="http://wordpress.org/">
       WordPress
      </a>
      构建 | 主题修改自
      <a href="http://wordpress.org/themes/twentythirteen">
       Twenty Thirteen
      </a>
     </div>
     <!-- .site-info -->
    </footer>
    <!-- #colophon -->
   </div>
   <!-- #page -->
  </div>
 </body>
</html>